package com.njbdqn.shoppingcart.test;

import java.util.Date;

import com.njbdqn.shoppingcart.entity.Cart;
import com.njbdqn.shoppingcart.entity.Userinfos;
import com.njbdqn.shoppingcart.services.CartService;

public class Demo {
	public static void main(String [] args) {
		Cart cart = new Cart();
		cart.setCartno(1);
		cart.setUser(new Userinfos(1, "aaaa", "123", new Date()));
		cart.setCartdate(new Date());
		
		CartService bs = new CartService(cart);
		bs.addShop(1, 10);
		bs.addShop(2, 5);
		bs.addShop(1, 2);
		System.out.println(cart.getShops());
		bs.delShop(1);
		System.out.println(cart.getShops());
		bs.clearShop();
		System.out.println(cart.getShops());
	}
}
